/*
 * @Author: zhaoxiangyu@
 * @Date: 2021-11-10 11:16:36
 * @LastEditors: 647355931@qq.com
 * @LastEditTime: 2021-12-18 16:06:36
 * @Description: file content
 */
/* styleguide.config.js */
const { paths } = require('react-app-rewired');
const overrides = require('react-app-rewired/config-overrides');
const config = require(paths.scriptVersion + '/config/webpack.config');
const path = require('path');

module.exports = {
  // 修改默认组件展示 （防止将子文件也打包）
  title: 'Agileh Ui',
  version: '1.0.0',
  // copyCodeButton:true,   // 复制代码按钮
  // locallyRegisterComponents:true, // 调用多个组件 只允许调用一次
  components: './src/components/**/*.jsx',
  // serverPort: 8066,  // 设置一个端口号
  // progressBar:true, //打包进度条
  webpackConfig: overrides.webpack(config(process.env.NODE_ENV), process.env.NODE_ENV),
  // getComponentPathLine(componentPath) {
  //   const name = path.basename(componentPath, '.js');
  //   const dir = path.dirname(componentPath);
  //   return `import ${name} from '${dir}';`;
  // },
  // 更改展示文件 默认为Readme.md
  // getExampleFilename(componentPath) {
  //   return componentPath.replace(/\.jsx?$/, '.examples.md')
  // },
  // 自定义日志
  logger: {
    // One of: info, debug, warn
    // Suppress messages
    info: () => {},
    // Override display function
    warn: message => console.warn(`NOOOOOO: ${message}`)
  },
  moduleAliases: {
    'rsg-example': path.resolve(__dirname, 'src')
  },
  ribbon: {
    // Link to open on the ribbon click (required)
    url: 'https://gitee.com/zxy_cns/agileh-ui/',
    // Text to show on the ribbon (optional)
    text: 'Fork me on Gitee'
  },
  theme: 'styleguide.theme.js',
	styles: 'styleguide.styles.js',
  template: {
    favicon: 'favicon.ico'
  }
};
